<template>
    <div class="dv"></div>
    <p>{{ msg }}</p>
</template>
<script>
//  <script setup>
// import { onBeforeMount, onMounted } from 'vue';

// onBeforeMount(() => {
//     console.log("Dom元素渲染之前", document.querySelector('.dv'));
// });
// onMounted(() => {
//     console.log("Dom元素渲染之后",document.querySelector('.dv'));
// }); 
export default {
    data() {
        return {
            msg: "Vue.js"
        }
    },
    beforeCreate() {
        console.log('实例创建前：' + this.msg)
    },
    created() {
        console.log('实例创建后：' + this.msg)
    }
}

</script>